<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="../bootstrap-5.1.3-dist/css/bootstrap.css">
    <script src="../bootstrap-5.1.3-dist/js/bootstrap.js"></script>
</head>

<body class="container">
    <h3 align="center">设置背景颜色</h3>
    <p class="bg-primary text-white">.bg-primary——蓝色背景</p>
    <p class="bg-secondary text-white">.bg-secondary——灰色背景</p>
    <p class="bg-success text-white">.bg-success——浅绿色背景</p>
    <p class="bg-danger text-white">.bg-danger——浅红色背景</p>
    <p class="bg-warning text-white">.bg-warning——浅黄色背景</p>
    <p class="bg-info text-white">.bg-info——浅蓝色背景</p>
    <p class="bg-light">.bg-light——浅灰色背景</p>
    <p class="bg-dark text-white">.bg-dark——深灰色背景</p>
    <p class="bg-white">.bg-white——白色背景</p>
</body>

</html>